﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.zbar {
    import Engine.Classes.*;

    public class ZBarNotifier {

        private static var m_queueNotifications:Boolean = false;
        private static var m_playerInitialized:Boolean = false;
        private static var m_queuedNotifications:Array = new Array();

        public static function awardXP(_arg1:Number):void{
            if ((((_arg1 <= 0)) || ((m_playerInitialized == false)))){
                return;
            };
            if (m_queueNotifications){
                m_queuedNotifications.push(_arg1);
            } else {
                ZBarNotifier.snapiAwardXP(_arg1);
            };
        }
        public static function set playerInitialized(_arg1:Boolean):void{
            m_playerInitialized = _arg1;
        }
        public static function set queueNotifications(_arg1:Boolean):void{
            m_queueNotifications = _arg1;
            if (_arg1 == false){
                ZBarNotifier.flushNotifications();
            };
        }
        private static function flushNotifications():void{
            var _local1:Number;
            while (m_queuedNotifications.length > 0) {
                _local1 = m_queuedNotifications.pop();
                ZBarNotifier.snapiAwardXP(_local1);
            };
        }
        private static function snapiAwardXP(_arg1:Number):void{
            if ((GlobalEngine.socialNetwork is SNAPISocialNetwork)){
                (GlobalEngine.socialNetwork as SNAPISocialNetwork).snapiAwardXp(_arg1);
            };
        }

    }
}//package Classes.zbar 
